package com.example.hackerweb.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.hackerweb.properties.RedisUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Description：
 *
 * @Author: cw
 * CreateTime：2022-10-10
 */
@RestController
@RequestMapping("authentication")
public class Controller {

    @Resource
    RedisUtils redisUtils;

    @GetMapping("info")
    public List info() {
        long start = System.currentTimeMillis();
        String key = "data:ssq:count";
        List list = redisUtils.lrangt(key);
        long end = System.currentTimeMillis();
        System.out.println(end-start);
        return list;
    }

}
